<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.5.1.js" charset="utf-8"></script>

    <script>
        async function show() {
            let a = 12;
            let b = 6;

            let data = await $.ajax({url: 'data/1.text', dataType: 'json'});
            console.log(data)

            console.log(a+b+data[0]);
        }
        show();

        // 依次远程读取一组url，按序输出结果
        async function logInorder(urls) {
            // 并发远程读取url
            const textPromises = urls.map(async url => {
                const response = await fetch(url);
                return response.text();
            })

            // 按序输出
            for (const textPromise of textPromises) {
                console.log(await textPromise)
            }
        }

    </script>

</head>
<body>

</body>
</html>